package com.aternity;

import com.google.common.io.BaseEncoding;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;

import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;

/**
 * @author Daniel Orr
 */
public class AAA {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s = "%22User+Name%22%2C%22Host+Name%22%2C%22Operating+System%22%2C%22Location%22%2C%22IP+Address%22%2C%22Connection%22%2C%22Type%22%2C%22%22%2C%22%22%2C%22%22%2C%22End+Point+ID%22%2C%0D%0A+++++++%2C%22dddl-VM-agent71%22%2C%22+%22%2C%22+%22%2C%22+%22%2C%22Disconnected%22%2C%22Desktop%22%2C%22+%22%2C%22+%22%2C%22+%22%2C%221%22%2C%0D%0A+++++++daniel%2C%22daniel-VM%22%2C%22Microsoft+Windows+7+Professional%22%2C%22+%22%2C%2210.0.2.15%22%2C%22Reporting%22%2C%22Desktop%22%2C%22+%22%2C%22+%22%2C%22+%22%2C%222%22%2C%0D%0A+++++++";
        String result = java.net.URLDecoder.decode(s, "UTF-8");
        String s2 = new String(Base64.decodeBase64(s), Charset.forName("UTF8"));
        System.out.println(result);
    }
}
